<div class="defects b-island tab-content-fill" pane-set ng-if="defects.length > 0">
    <div class="pane_col defects_list" pane pane-expanded="isState('defects')" on-keynav="select($direction)">
        <div class="pane_overlay clickable" ui-sref="defects.defect"></div>
        <div class="pane_content" ui-scrollfix-target>
            <div ng-repeat="type in defects">
                <h3 class="pane__header defect_title defect_type_{{type.status|lowercase}}" ui-scrollfix inherit-width>
                    {{type.title | translate}}
                    <small>{{'defects.STATISTIC' | translate:'{amount: type.defects.length}':'messageformat'}}</small>
                </h3>
                <table allure-table class="test-list table table-hover table-condensed" sorting="sorting">
                    <tr class="clickable" ng-repeat="defect in type.defects | orderBy:sorting.predicate:sorting.reverse" ng-click="setDefect(defect)" ng-class="{active:defect == $parent.defect}">
                        <td allure-table-col="{heading:'Count', predicate: 'testCases.length', flex: 1, class:'text-center'}" class="text-center"><span class="label label-status-{{type.status|lowercase}}">{{defect.testCases.length}}</span></td>
                        <td allure-table-col="{heading:'Defect', predicate: 'failure.message', flex: 20}" class="text-status-{{type.status|lowercase}}">{{defect.failure.message}}</td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    <div class="pane_col" ng-if="defect" pane pane-expanded="isState('defects.defect.expanded')">
        <div class="pane_overlay clickable" ui-sref="defects.defect.testcase"></div>
        <div class="pane_content">
            <h3 class="pane__header title-status-{{defect.type|lowercase}}">
                <div class="pane__header_controls pull-right">
                    <span class="fa fa-expand clickable" tooltip="{{'tooltip.EXPAND' | translate}}" ng-hide="isState('defects.defect.expanded')" ui-sref="defects.defect.expanded"></span>
                    <span class="fa fa-compress clickable" tooltip="{{'tooltip.COLLAPSE' | translate}}" ng-show="isState('defects.defect.expanded')" ui-sref="defects.defect"></span>
                    <span class="fa fa-close clickable" tooltip="{{'tooltip.CLOSE' | translate}}" ui-sref="defects"></span>
                </div>
                Defect
            </h3>
            <div class="testcase__status alert-status-{{defect.type|lowercase}}">
                {{defect.failure.message}}
            </div>
            <div testcases-list="defect.testCases" statuses="showStatuses" selected-uid="testcase.uid"></div>
        </div>
    </div>
    <div ui-view="testcase"></div>
</div>
<div class="tab-blank__text" ng-if="defects.length == 0">
    <img src="img/tests_passed.jpg"
         alt="happiness"/>
    <p>{{'defects.NO_DEFECTS' | translate}}</p>
</div>
